package com.sina.shop.manage.service.menu;

import com.sina.shop.core.BaseService;
import com.sina.shop.core.exception.client.DataException;
import com.sina.shop.core.exception.server.CreateException;
import com.sina.shop.core.exception.server.ResourceExistsException;
import com.sina.shop.core.exception.server.UpdateException;
import com.sina.shop.domain.menu.Menu;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA
 * description:
 * 段浩杰 2017-12-27 23:11
 */
public interface MenuManageService extends BaseService{

    Menu getMenuByName(String name);

    Menu getMenuById(Long id);

    int deleteMenu(Long id) throws DataException, UpdateException;

    Menu saveMenu(Menu menu) throws CreateException, ResourceExistsException, DataException;

    Menu updateMenu(Menu menu) throws UpdateException, DataException;

    List<Map<String, Object>> getMenuList(Menu menu, Long count[]);

    List<Map<String, Object>> getMenuIdAndNameList(Boolean hasAll);
}
